<template>
	<view class="mix-botoom-operation row" v-if="type==0 || type == 1||type == 2" >
		<view class="btn-group row" v-if="type == 0||type == 1">
			<view class="btn3 center left" @click="onOprationClick('cancel')">
				<text>取消</text>
			</view>
			<!-- <view class="btn3 center middle" @click="onOprationClick('delay')">
				<text>延期</text>
			</view> -->
			<view class="btn3 center right" @click="onOprationClick('edit')">
				<text>编辑</text>
			</view>
		</view>
		<view class="btn-group row" v-else-if="type == 2">
			<view class="btn2 center" @click="onOprationClick('finish')">
				<text>赛事结算</text>
			</view>
		</view>
		<mix-loading v-if="isLoading" :mask="true"></mix-loading>
	</view>
	
</template>

<script>
	export default {
		name: 'BotoomOperation',
		data() {
			return {
			};
		},
		computed: {
		},
		props: {
			type: {
				type: String,
				default: '0'
			}
		},
		watch: {
			type(type){
			}
		},
		methods: {
			onOprationClick(type){
				this.$emit('onOprationClick', type)
			},
			switchTab(url){
				uni.switchTab({
					url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.mix-botoom-operation{
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 90;
		width: 100%;
		height: 100rpx;
		background-color: #fff;
		box-shadow: 0 -2rpx 10rpx 0 rgba(0,0,0,.1);
		box-sizing: content-box;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom); 
	}
	.nav-group{
		padding-left: 6rpx;
		
		.nav{
			width: 90rpx;
			height: 80rpx;
			color: #333;
			position: relative;
		
			&.active{
				color: $base-color;
			}
		}
		.tit{
			font-size: 20rpx;
		}
		.mix-icon{
			height: 48rpx;
			line-height: 48rpx;
			font-size: 38rpx;
			margin-bottom: 6rpx;
		}
		.number{
			position: absolute;
			right: 16rpx;
			top: 2rpx;
			min-width: 24rpx;
			height: 24rpx;
			padding: 0 8rpx;
			font-size: 16rpx;
			color: #fff;
			background-color: $base-color;
			border-radius: 100rpx;
		}
	}
	.btn-group{
		flex: 1;
		margin: 0 16rpx 0 14rpx;
		overflow: hidden;
		
		.btn{
			flex: 1;
			height: 76rpx;
			font-size: 30rpx;
			color: #fff;
			background-color: $grey;
			border-radius: 100rpx 0 0 100rpx;
			&:last-child{
				background-color: $base-color;
				border-radius: 0 100rpx 100rpx 0;
			}
		}
		
		.btn2{
			flex: 1;
			height: 76rpx;
			font-size: 30rpx;
			color: #fff;
			background-color: $base-color;
			border-radius: 100rpx 100rpx 100rpx 100rpx;
			
		}
		
		.btn3{
			flex: 1;
			height: 76rpx;
			font-size: 30rpx;
			color: #fff;
		}
		.left{
			background-color: $grey;
			border-radius: 100rpx 0 0 100rpx;
		}
		.middle{
			background-color: $green;
		}
		.right{
			background-color: $base-color;
			border-radius: 0 100rpx 100rpx 0;
		}
	}
	
</style>
